<div id="profileDiv">
<?php
    $options = array();
    $this->funeral_dir_profile = $this->user_profile;
    $options['picture_path'] = "/keystone/VAS/public/art/FD/".$this->funeral_dir_profile['photo'];
	$options['funeral_dir_profile'] = $this->funeral_dir_profile; 
    $options['action'] = $this->url( array('controller'=>'index', 'action'=>'fdmyaccount') );
        
    $form = new FuneralDirectorForm( $options );
	
    // run a validity check here.
    $is_valid = $form->isValid( $this->funeral_dir_profile );

    // populate the form with the profile data
    $form->populate( $this->funeral_dir_profile );
	$form_str = $form->render_with_template( 'funeraldirectorprofile.xhtml' );
 ?>
</div>
<div id="branchesDiv"><br>
    <strong class="standard">Funeral Homes</strong>
    <div id="branchesList" jsId="dBranchesList" dojoType="dijit.layout.ContentPane">
	    <?php
	    // loop thru $this->homes and generate a <div> for each one, separated by <br clear=both>
			foreach( $this->homes as $home )
			{
				$branch_name = $home['name'];
				$branch_address = $home['addr1'];
				$branch_city = $home['city'];
				$branch_state = $home['state'];
				$branch_phone = $home['phone'];
				
				echo "<div>";
				echo "<strong>$branch_name</strong><br>";
				echo "$branch_address<br>";
				echo "$branch_city, $branch_state<br>";
				echo "$branch_phone<p>";
				echo "</div>";
			}
	      ?>
    </div>
</div>
<br clear="both">
